<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:80:"/data/www/html/web2017/public_html/../application/index/view/user/user_info.html";i:1498469018;s:75:"/data/www/html/web2017/public_html/../application/index/view/public/ad.html";i:1499492224;s:72:"/data/www/html/web2017/public_html/../application/index/view/footer.html";i:1505293149;}*/ ?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title><?php echo $user['nickname']; ?>-树人号</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <!--<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">-->
    <link rel="stylesheet" href="__STATIC__/style/weui.min.css">
    <link rel="stylesheet" href="__STATIC__/style/cmgd.css">
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <!--奥森图标-->
    <link rel="stylesheet" href="__STATIC__/style/FontAwesome_4.2.0/css/font-awesome.min.css">
    <script src="/static/admin/js/laypage/laypage.js"></script>
    <script src="/static/admin/js/laytpl/laytpl.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/js/layer/layer.js" ></script>
    <style>
        .text{padding-left:9px; }
        .fa-list-ul{padding-right:3px;}
        .weui-media-box__desc img{width:22px;height:22px;}
        .weui-grid__icon {width:95%; }

        .weui-navbar_userA{
            display: -webkit-box;
            display: -webkit-flex;
            z-index: 100;
        }
        .weui-search-bar{
            position: relative;
        }
        .bg {
            background: url('/uploads/face/<?php echo $user['head_img']; ?>');
            height:250px;
            text-align: center;
            /*line-height: 200px;*/
        }
        .bg-blur {
            float: left;
            width: 100%;
            background-repeat: no-repeat;
            background-position: center;
            background-size: cover;
            -webkit-filter: blur(15px);
            -moz-filter: blur(15px);
            -o-filter: blur(15px);
            -ms-filter: blur(15px);
            filter: blur(15px);
        }
        #guanzhu{width:100px;height: 30px;line-height:30px;border:1px #ccc solid;padding: 3px 15px;border-radius: 5px;}
        .content-front {
            position:absolute;
            left: 50px;
            right: 50px;
            height:250px;
            /*line-height: 200px;*/
            text-align: center;
            color: #ffffff;
            font-size: 13px;
        }

        .content-front img{
            border-radius: 60px;
            width: 60px;
            height: 60px;
            margin-top: 50px;
            z-index: 0;
        }
        .content-front .name{
            font-size: 17px;
        }

        .weui-navbar+.weui-tab__panel{padding-top:55px;}
        .username{font-size:15px;color:#000;}
    </style>
</head>
<body>

<div class="container" id="container">

    <div class="page home js_show">

    <div style="height:250px;">
    <div class="bg bg-blur"></div>
        <div class="content-front">
                <img src="/uploads/face/<?php echo $user['head_img']; ?>" >
                <div class="name"><?php echo $user['nickname']; ?></div>
                <div>关注:<?php echo $user['focus']; ?>|粉丝:<?php echo $user['fans']; ?></div>
                <div>简介：<?php echo $user['desc']; ?></div>
                <?php if($myuser_id != $user['id']): ?>
                <div><span id="guanzhu" onclick="isfoucs(<?php echo $user['id']; ?>)"><?php if($user['is_focus']==1): ?>已关注<?php else: ?>关注<?php endif; ?></span></div>
                <?php endif; ?>
        </div>
    </div>
    <!--顶部搜索-->

        <div class="page__bd" style="height: 100%;">
            <!--选择导航-->

            <div class="weui-tab" id="navbar">

                <div class="weui-search-bar" id="searchBar">
                    <form class="weui-search-bar__form">
                        <div class="weui-search-bar__box">
                            <i class="weui-icon-search"></i>
                            <input type="search" class="weui-search-bar__input" id="searchInput" placeholder="搜索" required="">
                            <a href="javascript:" class="weui-icon-clear" id="searchClear"></a>
                        </div>
                        <label class="weui-search-bar__label" id="searchText">
                            <i class="weui-icon-search"></i>
                            <span>搜索</span>
                        </label>
                    </form>
                    <a href="javascript:" class="weui-search-bar__cancel-btn" id="searchCancel">取消</a>
                </div>
                <div class="weui-navbar">
                    <?php if(!empty($user_column)): ?>
                    <!--<div class="weui-navbar__item ">个人动态</div>-->
                    <div class="weui-navbar__item  weui-bar__item_on" id="0">全部</div>
                    <?php if(is_array($user_column) || $user_column instanceof \think\Collection || $user_column instanceof \think\Paginator): if( count($user_column)==0 ) : echo "" ;else: foreach($user_column as $key=>$vv): ?>

                        <div class="weui-navbar__item" id="<?php echo $vv['id']; ?>"><?php echo $vv['user_column']; ?></div>



                    <?php endforeach; endif; else: echo "" ;endif; endif; ?>
                </div>


                <div class="weui-tab__panel">
                    <!--<div id="gfdt">-->
                        <!--<div class="weui-tab__panel">-->
                            <!--<script id="list-template" type="text/html">-->
                                <!--{{# for(var i=0;i<d.length;i++){  }}-->
                                <!--<div class="weui-panel articlelist">-->
                                    <!--<div class="weui-panel__hd">-->
                                        <!--<img src="/uploads/face/{{d[i].head_img}}" class="headPic">-->
                                        <!--<div class="userName">-->
                                            <!--<h4 class="weui-media-box__title username">{{d[i].nickname}}</h4>-->
                                            <!--<p class="weui-media-box__desc addTime">{{d[i].addtime}}</p>-->
                                        <!--</div>-->
                                    <!--</div>-->
                                    <!--<div class="weui-panel__bd">-->
                                        <!--<div class="weui-media-box weui-media-box_text">-->
                                            <!--<p class="weui-media-box__desc content" >-->
                                                <!--{{d[i].content}}-->
                                            <!--</p>-->
                                        <!--</div>-->
                                    <!--</div>-->


                                    <!--{{# if(d[i].img!=''){ }}-->
                                    <!--<div class="weui-grids">-->

                                        <!--{{# for(var k=0;k< d[i].imgs.length;k++){  }}-->

                                        <!--<a href="javascript:;" class="weui-grid">-->
                                            <!--<div class="weui-grid__icon">-->
                                                <!--<img src="/uploads/images/{{d[i].imgs[k].imgpath}}" alt="" >-->
                                            <!--</div>-->
                                        <!--</a>-->


                                        <!--{{# } }}-->
                                    <!--</div>-->
                                    <!--{{# } }}-->


                                    <!--{{# if(d[i].share_id>0){ }}-->

                                    <!--<div class="weui-panel__bd" style="background: #f3f0f0;">-->
                                        <!--<div class="weui-media-box weui-media-box_text">-->
                                            <!--<p class="weui-media-box__desc content" >-->
                                                <!--<span class="blue">@{{d[i].sharename}}  </span>{{d[i].sharecontent}}-->
                                            <!--</p>-->
                                        <!--</div>-->
                                    <!--</div>-->

                                    <!--{{# if(d[i].share_img!=''){ }}-->
                                    <!--<div class="weui-grids" style="background: #f3f0f0;">-->

                                        <!--{{# for(var q=0;q< d[i].share_imgs.length;q++){  }}-->

                                        <!--<a href="javascript:;" class="weui-grid">-->
                                            <!--<div class="weui-grid__icon">-->
                                                <!--<img src="/uploads/images/{{d[i].share_imgs[q].imgpath}}" alt="" >-->
                                            <!--</div>-->
                                        <!--</a>-->


                                        <!--{{# } }}-->
                                    <!--</div>-->
                                    <!--{{# } }}-->



                                    <!--{{# } }}-->

                                    <!--<div class="weui-form-preview__ft">-->

                                        <!--<a class="weui-form-preview__btn weui-form-preview__btn_default" href="javascript:"><i-->
                                                <!--class="fa fa-external-link" onclick="shares({{d[i].id}})"> {{d[i].shares}}</i></a>-->
                                        <!--<a class="weui-form-preview__btn weui-form-preview__btn_default" id="comment1"-->
                                           <!--onclick="comment('{{d[i].id}}',this)"><i class="fa fa-comment-o" id="coll_{{d[i].id}}">{{d[i].pinglun}}</i>-->
                                        <!--</a>-->
                                        <!--<a class="weui-form-preview__btn weui-form-preview__btn_default no"-->
                                           <!--onclick="thumbsUp('{{d[i].id}}',this)"><i class="fa {{# if(d[i].is_zan==1){ }}fa-thumbs-up{{# }else{ }}fa-thumbs-o-up{{# } }}" id="zan_{{d[i].id}}">{{d[i].zan}}</i></a>-->


                                    <!--</div>-->
                                    <!--<div class="weui-form-preview__ft "  >-->
                                        <!--<div class="weui-cells weui-cells_form comment" id="pl_{{d[i].id}}" style="display: none">-->
                                            <!--<div  id="pp_{{d[i].id}}">-->
                                                <!--{{# for(var j=0;j< d[i].comment.length;j++){  }}-->
                                                <!--<div class="weui-cell__bd huifu">-->
                                                    <!--<p class="weui-media-box__desc desc"><b class="name">{{d[i].comment[j].nickname}}：</b> {{d[i].comment[j].content}}</p>-->
                                                <!--</div>-->
                                                <!--{{# } }}-->
                                            <!--</div>-->
                                            <!--<div class="weui-cell" style="margin-top: 5px;">-->
                                                <!--<div class="weui-flex__item">-->
                                                    <!--<div id="comment_{{d[i].id}}" class="weui-textarea" contenteditable="true" style="height:50px; overflow: auto;"></div>-->
                                                <!--</div>-->
                                                <!--<div class="" style="font-size: 22px;">-->
                                                    <!--<a href="javascript:;" onclick="showemoji({{d[i].id}})"><i class="fa fa-meh-o" style="font-size: 22px;"></i></a>-->
                                                <!--</div>-->
                                            <!--</div>-->
                                            <!--<div id="emoji_{{d[i].id}}" class="emoji"  style="background:#fff; margin-top:10px;padding: 5px 0;display:none;text-align: left;">-->
                                                <!--<a href="javascript:;" onclick="addemoji(1,{{d[i].id}})"> <span><img src="/static/emoji/img/1.gif"></span> </a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(2,{{d[i].id}})"><span><img src="/static/emoji/img/2.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(3,{{d[i].id}})"><span><img src="/static/emoji/img/3.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(4,{{d[i].id}})"><span><img src="/static/emoji/img/4.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(5,{{d[i].id}})"><span><img src="/static/emoji/img/5.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(6,{{d[i].id}})"><span><img src="/static/emoji/img/6.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(7,{{d[i].id}})"><span><img src="/static/emoji/img/7.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(8,{{d[i].id}})"><span><img src="/static/emoji/img/8.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(9,{{d[i].id}})"><span><img src="/static/emoji/img/9.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(10,{{d[i].id}})"><span><img src="/static/emoji/img/10.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(11,{{d[i].id}})"><span><img src="/static/emoji/img/11.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(12,{{d[i].id}})"><span><img src="/static/emoji/img/12.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(13,{{d[i].id}})"><span><img src="/static/emoji/img/13.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(14,{{d[i].id}})"><span><img src="/static/emoji/img/14.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(15,{{d[i].id}})"><span><img src="/static/emoji/img/15.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(16,{{d[i].id}})"><span><img src="/static/emoji/img/16.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(17,{{d[i].id}})"><span><img src="/static/emoji/img/17.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(18,{{d[i].id}})"><span><img src="/static/emoji/img/18.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(19,{{d[i].id}})"><span><img src="/static/emoji/img/19.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(20,{{d[i].id}})"><span><img src="/static/emoji/img/20.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(21,{{d[i].id}})"><span><img src="/static/emoji/img/21.gif"></span></a>-->
                                                <!--<a href="javascript:;" onclick="addemoji(22,{{d[i].id}})"><span><img src="/static/emoji/img/23.jpg"></span></a>-->
                                            <!--</div>-->
                                            <!--<div class="button-sp-area"><a href="javascript:;" onclick="submit({{d[i].id}})"  class="weui-btn weui-btn_mini weui-btn_primary">提交评论</a>-->
                                            <!--</div>-->
                                        <!--</div>-->
                                    <!--</div>-->
                                <!--</div>-->
                                <!--{{# } }}-->
                            <!--</script>-->
                            <!--<div id="list-content"></div>-->
                        <!--</div>-->

                    <!--</div>-->
                    <div id="wzzx">
                        <!--<?php if($ad['type'] == 0): ?>
    <div style="line-height:0;">
        <a href="<?php echo $ad['ad']['link_url']; ?>" > <img src="/uploads/images/<?php echo $ad['ad']['images']; ?>" width="100%">   </a>
    </div>
<?php else: ?>
        <div id="scrollimg" class="scrollimg">
        <div class="bd">
            <ul>
                <?php if(is_array($ad['ad']) || $ad['ad'] instanceof \think\Collection || $ad['ad'] instanceof \think\Paginator): if( count($ad['ad'])==0 ) : echo "" ;else: foreach($ad['ad'] as $key=>$v): ?>
                    <li><a href="<?php echo $v['link_url']; ?>" ><img src="/uploads/images/<?php echo $v['images']; ?>" width="100%" /></a></li>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </ul>
        </div>
        <div class="hd">
            <ul></ul>
        </div>
        </div>
        <script type="text/javascript">
            TouchSlide({
                slideCell:"#scrollimg",
                titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
                mainCell:".bd ul",
                effect:"leftLoop",
                autoPage:true,//自动分页
                autoPlay:true //自动播放,
            });
</script>


<?php endif; ?>-->
                        <div class="weui-panel articlelist">


                            <div class="page__bd" >

                                <?php if(!empty($article)): ?>

                                <div class="weui-panel weui-panel_access">
                                    <div class="weui-panel__hd" style="font-size:16px;color: #000;"><i class="fa fa-list-ul"></i>普通文章列表</div>
                                    <div class="weui-panel__bd">
                                        <?php if(is_array($article) || $article instanceof \think\Collection || $article instanceof \think\Paginator): if( count($article)==0 ) : echo "" ;else: foreach($article as $key=>$article): ?>
                                        <a href="<?php echo url('index/article_detail',array('id'=>$article['id'])); ?>" class="weui-media-box weui-media-box_appmsg">
                                            <?php if($article['photo'] !=''): ?>

                                            <div class="weui-media-box__hd">
                                                <img class="weui-media-box__thumb" src="/uploads/images/<?php echo $article['photo']; ?>" height="100%" alt="">
                                            </div>

                                            <?php endif; ?>
                                            <div class="weui-media-box__bd">
                                                <h4 class="weui-media-box__title"><?php echo $article['title']; ?></h4>
                                                <p class="weui-media-box__desc" ><?php echo $article['author']; ?> &nbsp;&nbsp;&nbsp;&nbsp; <?php echo $article['create_time']; ?></p>
                                            </div>
                                        </a>
                                        <?php endforeach; endif; else: echo "" ;endif; ?>
                                    </div>
                                    <!--<div class="weui-panel__ft">-->
                                        <!--<a href="<?php echo url('article/article'); ?>" class="weui-cell weui-cell_access weui-cell_link">-->
                                            <!--<div class="weui-cell__bd">查看更多</div>-->
                                            <!--<span class="weui-cell__ft"></span>-->
                                        <!--</a>-->
                                    <!--</div>-->
                                </div>
                                <?php endif; ?>

                                <!--<?php if($user['group_id']==8): ?>-->
                                    <?php if(!empty($essay)): ?>
                                    <div class="weui-panel weui-panel_access">
                                        <div class="weui-panel__hd" style="font-size:16px;color: #000;"><i class="fa fa-list-ul"></i>征文列表</div>
                                        <div class="weui-panel__bd">
                                            <?php if(is_array($essay) || $essay instanceof \think\Collection || $essay instanceof \think\Paginator): if( count($essay)==0 ) : echo "" ;else: foreach($essay as $key=>$essay): ?>
                                            <a href="<?php echo url('index/essay_detail',array('id'=>$essay['id'])); ?>" class="weui-media-box weui-media-box_appmsg">
                                                <div class="weui-media-box__hd">
                                                    <img class="weui-media-box__thumb" src="/uploads/images/<?php echo $essay['photo']; ?>" height="100%" alt="">
                                                </div>
                                                <div class="weui-media-box__bd">
                                                    <h4 class="weui-media-box__title"><?php echo $essay['title']; ?></h4>
                                                    <p class="weui-media-box__desc" ><?php echo $essay['author']; ?> &nbsp;&nbsp;&nbsp;&nbsp; <?php echo $essay['create_time']; ?></p>
                                                </div>
                                            </a>
                                            <?php endforeach; endif; else: echo "" ;endif; ?>
                                        </div>
                                    </div>
                                    <?php endif; ?>
                                <!--<?php endif; ?>-->



                                <?php if(!empty($debate)): ?>
                                <div class="weui-panel weui-panel_access">
                                    <div class="weui-panel__hd" style="font-size:16px;color: #000;"><i class="fa fa-list-ul"></i>话题列表</div>
                                    <div class="weui-panel__bd">
                                        <?php if(is_array($debate) || $debate instanceof \think\Collection || $debate instanceof \think\Paginator): if( count($debate)==0 ) : echo "" ;else: foreach($debate as $key=>$debate): ?>
                                        <a href="<?php echo url('index/debate_detail',array('id'=>$debate['id'])); ?>" class="weui-media-box weui-media-box_appmsg">
                                            <div class="weui-media-box__hd">
                                                <img class="weui-media-box__thumb" src="/uploads/images/<?php echo $debate['photo']; ?>" height="100%" alt="">
                                            </div>
                                            <div class="weui-media-box__bd">
                                                <h4 class="weui-media-box__title"><?php echo $debate['title']; ?></h4>
                                                <p class="weui-media-box__desc" ><?php echo $debate['author']; ?> &nbsp;&nbsp;&nbsp;&nbsp; <?php echo $debate['create_time']; ?></p>
                                            </div>
                                        </a>
                                        <?php endforeach; endif; else: echo "" ;endif; ?>
                                    </div>
                                </div>
                                <?php endif; ?>

                            </div>


                        </div>


                    </div>

                </div>
            </div>

        </div>
    </div>

    <div class="weui-tabbar footer" >
    <a href="<?php echo url('index/index'); ?>" class="weui-tabbar__item <?php if($footfrom ==1): ?>weui-bar__item_on <?php endif; ?>">
                        <span style="display: inline-block;position: relative;">
                            <i class="fa fa-home weui-tabbar__icon   "></i>
                        </span>
        <p class="weui-tabbar__label">首页</p>
    </a>
    <a href="<?php echo url('usercenter/dynamic'); ?>" class="weui-tabbar__item <?php if($footfrom ==2): ?>weui-bar__item_on <?php endif; ?>">
                        <span style="display: inline-block;position: relative;">
                            <i class="fa fa-comments weui-tabbar__icon " ></i>
                            <!--<span class="weui-badge weui-badge_dot" style="position: absolute;top: 0;right: -6px;"></span>-->
                        </span>
        <p class="weui-tabbar__label">我的圈子</p>
    </a>
    <a href="<?php echo url('usercenter/index'); ?>" class="weui-tabbar__item <?php if($footfrom==3): ?>weui-bar__item_on <?php endif; ?>">
                        <span style="display: inline-block;position: relative;">
                            <i class="fa fa-user weui-tabbar__icon"></i>
                            <!--<span class="weui-badge" style="position: absolute;top: -2px;right: -6px;">8</span>-->
                        </span>
        <p class="weui-tabbar__label">我的</p>

    </a>
</div>   

<script type="text/javascript">
    $(function(){
        $('.weui-tabbar__item').on('click', function () {
            $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
        });
    });
</script>

</div>
</body>

<script type="text/javascript">




//    var ccc =1;
//    Ajaxpage();
//    $(window).scroll(
//            function() {
//                var scrollTop = $(this).scrollTop();
//                var scrollHeight = $(document).height();
//                var windowHeight = $(this).height();
//                if (scrollTop + windowHeight == scrollHeight) {
//                    console.log(3);
//                    Ajaxpage();
//                }
//            });

    function Ajaxpage(){
        var user_id = '<?php echo $user['id']; ?>';
        $.post('<?php echo url("user/mydynamic"); ?>', {user_id:user_id,page:ccc}, function(data){
            //  $(".spiner-example").css('display','none'); //数据加载完关闭动画
            console.log(1);
            console.log(data);
            console.log(2);
            if(data==''){
                // $("#list-content").html('<td colspan="20" style="padding-top:10px;padding-bottom:10px;font-size:16px;text-align:center">暂无数据</td>');
            }else{
                var tpl = document.getElementById('list-template').innerHTML;
                laytpl(tpl).render(data, function(html){
                    // document.getElementById('list-content').innerHTML = html;
                    $('#list-content').append(html);
                    $('.weui-grid__icon').css('height',$('.weui-grid__icon').css('width'));
                    ccc++;
                });
            }
        });

    }

    //点赞
    function thumbsUp(id,obj){

        var t = '#zan_'+id;
        count = $(t).html();
        $.post('<?php echo url("usercenter/dynamic_zan"); ?>',
                {id:id},
                function(data){
                    if(data.code==11){
                        layer.msg(data.msg,{icon:5,time:1500,shade: 0.1,});
                        window.location.href="<?php echo url('user/login'); ?>";
                    }else {

                        count = parseInt(count);


                        if(data.code==1){
                            count = count+1;
                            $('#zan_'+id).removeClass('fa-thumbs-o-up');
                            $('#zan_'+id).addClass('fa-thumbs-up');
                            $('#zan_'+id).html(count);
                        }else{
                            count = count-1;
                            $('#zan_'+id).removeClass('fa-thumbs-up');
                            $('#zan_'+id).addClass('fa-thumbs-o-up');
                            $('#zan_'+id).html(count);
                        }
                    }

                });;







    }

    function comment(id,obj){
        var t = '#pl_'+id;
        var st = $(t).css('display');
        if(st=='none'){
            $('.comment').css('display','none');
            $(t).css('display','block');
        }else{
            $(t).css('display','none');
        }
    }


    function addemoji(i,j){
        var htl = "<img src='/static/emoji/img/"+i+".gif'>";
        $("#comment_"+j).append(htl);
    }



    function shares(id){

        location.href = '/index/usercenter/send_info/share_id/'+id+'.html';
    }

    function showemoji(id){
        var t = '#emoji_'+id;
        var st = $(t).css('display');
        if(st=='none'){
            $('.emoji').css('display','none');
            $(t).css('display','block');
        }else{
            $(t).css('display','none');
        }
    }




    $(function(){

        var $searchBar = $('#searchBar'),
                $searchResult = $('#searchResult'),
                $searchText = $('#searchText'),
                $searchInput = $('#searchInput'),
                $searchClear = $('#searchClear'),
                $searchCancel = $('#searchCancel');

        function hideSearchResult(){
            $searchResult.hide();
            $searchInput.val('');
        }
        function cancelSearch(){
            hideSearchResult();
            $searchBar.removeClass('weui-search-bar_focusing');
            $searchText.show();
        }

        $searchText.on('click', function(){
            $searchBar.addClass('weui-search-bar_focusing');
            $searchInput.focus();
        });
        $searchInput
                .on('blur', function () {
                    if(!this.value.length) cancelSearch();
                })
                .on('input', function(){
                    if(this.value.length) {
                        $searchResult.show();
                    } else {
                        $searchResult.hide();
                    }
                })
        ;
        $searchClear.on('click', function(){
            hideSearchResult();
            $searchInput.focus();
        });
        $searchCancel.on('click', function(){
            cancelSearch();
            $searchInput.blur();
        });
    });
    //顶部导航
    $(function(){
        $('.weui-navbar__item').on('click', function () {
            $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
            console.log( $(this).attr('id') ) ;

            var usert = '<?php echo $user['id']; ?>';
            var type= $(this).attr('id');
            window.location.href="/index/user/article_column/user_id/"+usert+"/type/"+type+".html";


        });
    });

    function isfoucs(id){
        $.post('<?php echo url("User/focus_user"); ?>',
                {fans_id:id},
                function(data){
                    if(data.code==11){
                        layer.msg(data.msg,{icon:5,time:1500,shade: 0.1,});
                        window.location.href="<?php echo url('user/login'); ?>";
                    }else{
                        if(data.code==1){
//                            $('#collect').removeClass('fa-heart-o');
//                            $('#collect').addClass('fa-heart');
                            $('#guanzhu').html('已关注');
                            layer.msg(data.msg,{icon:1,time:1500,shade: 0.1,});
                        }else{

                            $('#collect').removeClass('fa-heart');
                            $('#guanzhu').html('关注');
                            layer.msg(data.msg,{icon:5,time:1500,shade: 0.1,});
                        }
                    }
                });
    }



    //    //点赞
    //    function thumbsUp(id,obj){
    //        if($(obj).hasClass('no'))
    //        {
    //            $(obj).removeClass('no').addClass('yes');
    //            $(obj).html("<i class='fa fa-thumbs-up '> 15</i>");
    //        }else if($(obj).hasClass('yes')){
    //            $(obj).removeClass('yes').addClass('no');
    //            $(obj).html("<i class='fa fa-thumbs-o-up'> 14</i>");
    //        }else{ // 其他输入框操作
    //            var value = $(obj).val();
    //        }
    //    }
    //    function comment(id,obj){
    //        $('.comment').toggle(function(){
    //            $('.comment').next().css('display','block');
    //        },function(){
    //            $('.comment').next().css("display","none");
    //        });
    //    }
</script>

</html>